#include "tcpserver.h"

class EchoServer 
{
private:
    TcpServer m_server;
private:
    void connectHandler(const ConnectionPtr &conn);
    void closedHandler(const ConnectionPtr &conn);
    void MessageHandler(const ConnectionPtr &conn, Buffer *buf);
public:
    EchoServer(int port, const std::string& ip = defaultip);
    void start();
};